	<fieldset>
	<legend>Zmena kolektívu</legend>

  <?php
    echo form_open('user/kolektiv_zmena_validation');
    
    echo validation_errors();
    
    echo "<p><label>Názov triedy: </label>";
    if (($this->input->post('nazov') == NULL) and (isset($trieda))){
        echo form_input('nazov', set_value('nazov', $trieda), $this->input->post('nazov'));
    }else{
        echo form_input('nazov', set_value('nazov', $this->input->post('nazov')), $this->input->post('nazov'));
    }
    echo "</p>";
    
    
    
    echo "<p><label>Počet žiakov: </label>";
    if (($this->input->post('pocet') == NULL) and isset($pocet)){
        echo form_input('pocet', set_value('pocet', $pocet), $this->input->post('pocet'));
    }else{
        echo form_input('pocet', set_value('pocet', $this->input->post('pocet')), $this->input->post('pocet'));
    }
    
    echo "</p>";
    
    echo "<p><label>Škola: </label>";
    if (($this->input->post('skolaKolektiv') == NULL) and (isset($skola))){
        echo form_input('skolaKolektiv', set_value('skolaKolektiv', $skola), $this->input->post('skolaKolektiv'));
    }else{
        echo form_input('skolaKolektiv', set_value('skolaKolektiv', $this->input->post('skolaKolektiv')), $this->input->post('skolaKolektiv'));
    }
    echo "</p>";
    
    echo "<p><label>Priemerný vek: </label>";
    if (($this->input->post('vek') == NULL) and (isset($vek))){
        echo form_input('vek', set_value('vek', $vek), $this->input->post('vek'));
    }else{
        echo form_input('vek', set_value('vek', $this->input->post('vek')), $this->input->post('vek'));
    }
    echo "</p>";
    
    $options = array(
                   'matematika'  => 'Matematika',
                   'fyzika'    => 'Fyzika',
                   'informatika'   => 'Informatika',
                   'ine' => 'Iné',
                 );
    echo "<p><label>Zameranie: </label>"; 
    if (($this->input->post('zameranie') == NULL) and (isset($zameranie))){
        echo form_dropdown('zameranie', $options, set_value('zameranie', $zameranie), $this->input->post('zameranie'));
    }else{
        echo form_dropdown('zameranie', $options, set_value('zameranie', $this->input->post('zameranie')), $this->input->post('zameranie'));
    }           
    echo "</p>";
    
    
    echo "<p><label></label>";
    echo form_submit('kolektiv_change_submit', 'Ulož');
    echo "</p>";
    
    echo form_close();
	echo "<p><label></label>";
  ?><a href='<?php echo base_url()."user/kolektiv" ?>'><button>späť</button></a>
  </p>
</fieldset>